<template>
  <div>
    <div>defineEmits子触发父</div>
    <div>儿子的玩具：{{ sonToy }}</div>
    <son @sendToy="saveToy" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import son from './son.vue'

let sonToy = ref('')
function saveToy(toyName: string) {
  sonToy.value = toyName
}
</script>

<style lang="scss" scoped>

</style>